from django.db import models

from utils.common.models import BaseModel


class AdminInfo(BaseModel):
    """用户模型表"""
    username = models.CharField(verbose_name='用户名', max_length=225)
    password = models.CharField(verbose_name='密码', max_length=225)
    phone = models.CharField(verbose_name='手机号', max_length=11, unique=True)
    region = models.CharField(verbose_name='地区', max_length=225, default='ap-chengdu')
    bucket = models.CharField(verbose_name='桶名称', max_length=225, blank=True, null=True)

    def __str__(self):
        return self.username

    class Meta:
        db_table = 'auc_admin'
        verbose_name = '管理员'
        verbose_name_plural = verbose_name
